//
//  CountDownModeLevelBaseLayer.h
//  FruitCrush
//
//  Created by gaoyu on 15/7/26.
//
//

#ifndef __FruitCrush__CountDownModeLevelBaseLayer__
#define __FruitCrush__CountDownModeLevelBaseLayer__

#include "cocos2d.h"
#include "MonsterView.h"
#include "ScoreBarView.h"
#include "CountDownModeCrushView.h"
#include "OptionMenuView.h"
#include "PlayLevelRecorder.h"
#include "StartPromptView.h"
#include "LocalizedStringGetter.h"
#include "EndPromptView.h"
#include "ShowWinScreen.h"
#include "ShowFailScreen.h"
#include "HeroUsed.h"

USING_NS_CC;

class CountDownModeLevelBaseLayer : public cocos2d::Layer
{
public:
    int  m_level;
    int  monsterType;
    bool *bad_matrix;
    bool *bad_matrixUp;
    bool *bad_matrixBlank;
    bool *jelly_Matrix;
    int  m_bombNum;
    int moveStepLeft;
    int moveStepLimit;
    int typeNumLimit;

    CountDownModeLevelBaseLayer();
    ~CountDownModeLevelBaseLayer();
    bool baseInit();
private:
    Label* countDownText;
    bool m_isPause;
  //  MonsterView *monsterView;
    ScoreBarView *scoreBarView;
    CountDownModeCrushView *countDownModeCrushView;
    OptionMenuView *optionMenuView;
    StartPromptView* startPromptView;
    EndPromptView* endPromptView;

    void bgInit();
    void startPromptViewInit();
    void endPromptViewShow(bool success);
    void countDownTextInit();
    void setCountDownTextInit(int count);
   // void monsterViewInit();
    void scoreBarViewInit();
    void CountDownModeCrushViewInit();
  //  void pauseMenuInit();
    void attackMonster(int type);
    void crushCallback(Ref *sender);
    void updateCallback(Ref *sender);
    void crushBadStateCallback(Ref *sender);
  //  void monsterViewCallback(Ref *sender);
    void scoreBarViewCallback(Ref *sender);
    void optionMenuViewInit();
  //  void menuCallback(Ref *sender);
    void startPromptViewCallback(Ref *sender);
    void monsterViewBossAttackCallbackFun(Ref *sender);
    
    bool isBadStateMatrixNull();

};

#endif /* defined(__FruitCrush__CountDownModeLevelBaseLayer__) */
